public class Test {
    public static void main(String[] args) {
        LinkedList linkedList=new LinkedList();
        linkedList.addFirst(3);
        linkedList.addFirst(2);
        linkedList.addFirst(1);
        linkedList.addIndex(3,5);
        linkedList.display();

    }
}
